import type { UnionType } from '@/types/index'

export const isObject = (obj: UnionType) => typeof obj === 'object' && obj !== null

export const objHasOwn = <T extends object>(obj: T, property: keyof T): boolean =>
  Object.hasOwn(obj, property)
